﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Projeto_Build_0.Models;

namespace Projeto_Build_0.Controllers
{
    public class GaleriaSalaController : Controller
    {
        private JardimEntities db = new JardimEntities();
        //
        // GET: /GaleriaSala/

        public ActionResult Index(int id)
        {
            List<Foto> aux = new List<Foto>();
            foreach (var item in db.Fotos.ToList())
            {
                if (item.SalaId == id)
                    aux.Add(item);
            }
            return View(aux);
        }

        public ActionResult VerInfoFoto(Foto f)
        {
            return View(f);
        }

    }
}
